package com.zbkc.main;

import android.app.TabActivity;
import android.content.Intent;
import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.Window;
import android.widget.ImageView;
import android.widget.TabHost;
import android.widget.TextView;

public class TabManagerActivity extends TabActivity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.tab_content);
		TabHost localTabHost = getTabHost();
		localTabHost.setup();
		Intent localIntent1 = new Intent();
		localIntent1.setClass(this, BeiFenDeviceActivity.class);
		TabHost.TabSpec localTabSpec1 = localTabHost.newTabSpec("status");
		localTabSpec1.setIndicator(getTabHostItem(2130837561, "我的备份"));
		localTabSpec1.setContent(localIntent1);
		localTabHost.addTab(localTabSpec1);
		Intent localIntent2 = new Intent();
		localIntent2.setClass(this, ShareActivity.class);
		TabHost.TabSpec localTabSpec2 = localTabHost.newTabSpec("setUp");
		localTabSpec2.setIndicator(getTabHostItem(2130837563, "我的共享"));
		localTabSpec2.setContent(localIntent2);
		localTabHost.addTab(localTabSpec2);
		Intent localIntent3 = new Intent();
		localIntent3.setClass(this, FileCupboardActivity.class);
		TabHost.TabSpec localTabSpec3 = localTabHost.newTabSpec("advanced");
		localTabSpec3.setIndicator(getTabHostItem(2130837560, "文件保险箱"));
		localTabSpec3.setContent(localIntent3);
		localTabHost.addTab(localTabSpec3);
		Intent localIntent4 = new Intent();
		localIntent4.setClass(this, MoreActivity.class);
		TabHost.TabSpec localTabSpec4 = localTabHost.newTabSpec("aaaa");
		localTabSpec4.setIndicator(getTabHostItem(2130837562, "更多"));
		localTabSpec4.setContent(localIntent4);
		localTabHost.addTab(localTabSpec4);
	}

	public View getTabHostItem(int paramInt, String paramString) {
		View localView = LayoutInflater.from(this).inflate(R.layout.tablayout,
				null);
		ImageView localImageView = (ImageView) localView
				.findViewById(2131296306);
		TextView localTextView = (TextView) localView.findViewById(2131296307);
		localImageView.setImageResource(paramInt);
		localTextView.setText(paramString);
		return localView;
	}

}
